import App from "@/views/App";
import Fast from "@/views/Fast";
import Home from "@/views/Home";
import Login from "@/views/Login";
import Mine from "@/views/Mine";
import Practise from "@/views/Practise";
import Select from "@/views/Select";
import Subjects from "@/views/Subjects";
import { BrowserRouter, Routes, Route, Navigate } from "react-router-dom";

const router = (
  <BrowserRouter>
    <Routes>
      <Route path="/login" element={<Login />}></Route>
      <Route path="/" element={<App />}>
        <Route path="home" element={<Home />}></Route>
        {/* <Route path="/" element={<Navigate to={"/home"} />}> */}
        <Route path="fast" element={<Fast />}></Route>
        <Route path="mine" element={<Mine />}></Route>
        <Route path="select/:actionCode" element={<Select />}></Route>
        <Route path="practise" element={<Practise />}></Route>
        <Route path="subjects" element={<Subjects />}></Route>
      </Route>
    </Routes>
  </BrowserRouter>
);

export default router;
